package com.googlecode.FWT.model
{
	import mx.collections.ArrayCollection;
		
	public class FreeWriteModel
	{	
		private static var _instance:FreeWriteModel;
		private static var isOK:Boolean = false;
		
		[Bindable]
		public var essayQuestion:String = "";
		[Bindable]
		public var name:String = "";
		[Bindable]
		public var results:ArrayCollection = new ArrayCollection();
		
		public function FreeWriteModel()
		{
			if(!isOK){
				throw(new Error("This is a singleton. Do not instantiate. Use model.FreeWriteModel.instance"));
			}
		}
			
		public static function get instance():FreeWriteModel
        {
        	if(!_instance){
				isOK = true;
				_instance = new FreeWriteModel();	
				isOK = false;
			}
			return _instance;
        }

	}
}